package edu.lnu.ums.entities;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Entity
public class StudentGroup extends ScientificUnit {
    private static final long serialVersionUID = 1L;

    @ManyToOne(cascade=CascadeType.PERSIST)
    @JoinColumn(name="leader")
    private Student leader;
    
    @Column
    private Integer studentsNumber;

    public Student getLeader() {
        return leader;
    }

    public void setLeader(Student leader) {
        this.leader = leader;
    }

    public Integer getStudentsNumber() {
        return studentsNumber;
    }

    public void setStudentsNumber(Integer studentsNumber) {
        this.studentsNumber = studentsNumber;
    }
}